package com.irdstudio.tdp.executor.core.plugin.gencode.vo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;
import java.util.Map;

public class ApiMethod {

    private static final Logger logger = LoggerFactory.getLogger(ApiMethod.class);

    private List<OsrvNodeInfo> executeFlow;
    private Map<String, List<OsrvInoutInfo>> inData;
    private Map<String, List<OsrvInoutInfo>> outData;
    private Map<String, List<OsrvIsrvEval>> inEvalData;
    private Map<String, List<OsrvIsrvEval>> outEvalData;
    private Map<String, AppModelInfo> serviceData;
    private AppModelInfo appModelInfo;
    private String subsCode;
    private AppModelInfo lastService;

    public List<OsrvNodeInfo> getExecuteFlow() {
        return executeFlow;
    }

    public void setExecuteFlow(List<OsrvNodeInfo> executeFlow) {
        this.executeFlow = executeFlow;
    }

    public Map<String, List<OsrvInoutInfo>> getInData() {
        return inData;
    }

    public void setInData(Map<String, List<OsrvInoutInfo>> inData) {
        this.inData = inData;
    }

    public Map<String, List<OsrvInoutInfo>> getOutData() {
        return outData;
    }

    public void setOutData(Map<String, List<OsrvInoutInfo>> outData) {
        this.outData = outData;
    }

    public Map<String, List<OsrvIsrvEval>> getInEvalData() {
        return inEvalData;
    }

    public void setInEvalData(Map<String, List<OsrvIsrvEval>> inEvalData) {
        this.inEvalData = inEvalData;
    }

    public Map<String, List<OsrvIsrvEval>> getOutEvalData() {
        return outEvalData;
    }

    public void setOutEvalData(Map<String, List<OsrvIsrvEval>> outEvalData) {
        this.outEvalData = outEvalData;
    }

    public Map<String, AppModelInfo> getServiceData() {
        return serviceData;
    }

    public AppModelInfo getServiceById(String id) {
        if (logger.isDebugEnabled()) {
            logger.debug("\n***************node app model id is {}, code {}, tableModelCode {}", id,
                    serviceData.get(id).getAppModelCode(),
                    serviceData.get(id).getTableModelCode());
        }
        return serviceData.get(id);
    }

    public void setServiceData(Map<String, AppModelInfo> serviceData) {
        this.serviceData = serviceData;
    }

    public AppModelInfo getAppModelInfo() {
        return appModelInfo;
    }

    public void setAppModelInfo(AppModelInfo appModelInfo) {
        this.appModelInfo = appModelInfo;
    }

    public AppModelInfo getLastService() {
        return lastService;
    }

    public void setLastService(AppModelInfo lastService) {
        this.lastService = lastService;
    }

    public String getSubsCode() {
        return subsCode;
    }

    public void setSubsCode(String subsCode) {
        this.subsCode = subsCode;
    }
}
